import drag from './el-drag-dialog/drag'
import copy from './copy/copy'
import animation from './animation/animation'
import permission from './permission/permission'
import permissions from './permission/permissions'
import permissionsAll from './permission/permissionsAll'
import autoScrolling from './autoScrolling/autoScrolling'

const install = function(Vue) {
  Vue.directive('el-drag-dialog', drag)
  Vue.directive('copy', copy)
  Vue.directive('animation', animation)
  Vue.directive('permission', permission)
  Vue.directive('permissions', permissions)
  Vue.directive('permissions-all', permissionsAll)
  Vue.directive('auto-scrolling', autoScrolling)
}

if (window.Vue) {
  window['el-drag-dialog'] = drag
  window['copy'] = copy
  window['animation'] = animation
  window['permission'] = permission
  window['permissions'] = permissions
  window['permissions-all'] = permissionsAll
  window['auto-scrolling'] = autoScrolling
  Vue.use(install); // eslint-disable-line
}

export default install
